var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var ObjectId = Schema.ObjectId;

var SaaserSchema = new Schema({
    title: {type: String},//标题
    url: {type: String},//链接
    thumb: {type: String},//缩略图
    sort: {type: Number, default: 0},//顺序
    nodetype:{type:String},//类型（类别/组别/链接）
    childs: [],//子集
    views:{type:Number,default:0},//被查看次数
    stars:{type:Number,default:0},//被收藏次数
    create_at: {type: Date, default: Date.now},
    update_at: {type: Date, default: Date.now}
});


mongoose.model('Saaser', SaaserSchema);
